package com.lxb.demo.serive;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.lxb.demo.pojo.ReadExcelPojo;

import java.util.Map;

/**
 * @author xuebin.li
 * @createTime 2022/10/29 11:47
 */
public class EasyReadExcelLister extends AnalysisEventListener<ReadExcelPojo> {

    //一行一行读取内容
    @Override
    public void invoke(ReadExcelPojo readExcelPojo, AnalysisContext analysisContext) {
        System.out.println("***data:" + readExcelPojo);
    }

    //读取表头内容
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("head:" + headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
